#pragma once
#include <qstring.h>
#include <functional>

enum EnumModRun
{
	emModRunFactory,                            //简单工厂模式/工厂方法模式;
	emModRunFactoryAbstract,                    //抽象工厂模式;
    emModRunObserver,                           //观察者模式;
	emModRunSingleton,                          //单例模式;
    emModRunStrategy,                           //策略模式;
    emModRunTemplateMethod,                     //模板方法模式;
    emModRunBuilder,                            //建造者模式;
    emModRunPrototype,                          //原型模式;
    emModRunAdapter,                            //适配器模式;
    emModRunBridge,                             //桥接模式;
    emModRunComposite,                          //组合模式;
    emModRunFlyweight,                          //享元模式;
    emModRunIterator,                           //迭代器模式;
    emModRunDecorator,                          //装饰器模式;
    emModRunFacade,                             //外观模式;
    emModRunProxy,                              //代理模式;
    emModRunCommand,                            //命令模式;
    emModRunInterpreter,                        //解释器模式;
    emModRunMediator,                           //中介者模式;
    emModRunChain,                              //责任链模式;
    emModRunMemento,                            //备忘录模式;
    emModRunState,                              //状态模式;
    emModRunVisitor,                            //访问者模式;
	emModRunNone                                //无效值;
};

//输出接口;
class IOutput
{
public:
	//输出信息; flag:-1:清空后显示，0:默认操作，1:加粗显示;
	virtual void OutPut(std::initializer_list<QString> outList, int flag = 0) = 0;
};

//模式运行接口;
class InterFaceModRun
{
public:
	//初始化显示模式;
	virtual void InitDisplay() = 0;

	//运行模式;
	virtual void ModRun() = 0;
};

//创建模式运行对象的函数指针;
typedef std::function<InterFaceModRun *()> OnCreateModRun;

typedef struct stEmCreate
{
    EnumModRun emStatus;
    OnCreateModRun Func;

    stEmCreate()
    {
        emStatus = emModRunNone;
        Func = NULL;
    }
}ST_EMCREATE;
